using System;
using System.Collections.Generic;
using System.Text;
using System.Configuration;
using Microsoft.ConnectionEngine.Registers.Core.ServiceProvider.Common;
using Microsoft.ConnectionEngine.Common.Security;
using Microsoft.ConnectionEngine.Common;

namespace Microsoft.ConnectionEngine.Administration.Core.ServiceProvider.Business
{
    /// <summary>
    /// Retrieves reference data  
    /// </summary>
    public class RefDataManager
    {
        public static ReferenceData GetRefData()
        {
            string payload = @"<HSDReferenceDataRequest xmlns=""http://Microsoft.ConnectionEngine/Schemas/ServiceProviderRegister""/>";
            ConnectionEngineMessage result = AdapterHelper.SendConnectionEngineMessage(
                AdapterHelper.GetMessageTypeValue(MessageTypes.HSDReferenceDataRequest), ConfigurationManager.AppSettings["ServiceProviderRegister.ServiceProviderID"], payload);
            return (ReferenceData)AdapterHelper.GetPayloadObjectFromResponse(result, typeof(ReferenceData)); 
        }
    }
}
